class User:
    """用户信息"""

    def __init__(self, name: str, user_id: str):
        self._name: str = name
        self._id: str = user_id
        self._work_hour_req: float = 0.0  # 应填工时
        self._work_hour_real: float = 0.0  # 实填工时
        self._requirementThroughputRate: str = "0%"  # 需求吞吐率
        self._work_hour_avg: float = 0.0  # 平均工时

    def __str__(self) -> str:
        id = f"[{self.id}]"
        name = str(self.name).ljust(5, "　")
        work_hour_req = str(self.work_hour_require).ljust(10, " ")
        work_hour_real = str(self.work_hour_real).ljust(10, " ")
        work_hour_per = (str(self.work_hour_per) + "%").ljust(10, " ")
        requirementThroughputRate = str(self.requirementThroughputRate).ljust(10, " ")
        return f"{id} {name} 应填工时：{work_hour_req} 实填工时：{work_hour_real} 填报率：{work_hour_per} 需求吞吐率: {requirementThroughputRate} 平均工时: {self.work_hour_avg}"

    @property
    def name(self) -> str:
        """用户名"""
        return self._name

    @property
    def id(self) -> str:
        """工号"""
        return self._id

    @property
    def work_hour_per(self) -> float:
        """工时填报率"""
        if self._work_hour_req <= 0:
            return 0.0
        return round(self._work_hour_real / self._work_hour_req * 100, ndigits=2)

    @property
    def work_hour_require(self) -> float:
        """应填工时"""
        return self._work_hour_req

    @work_hour_require.setter
    def work_hour_require(self, value: float):
        self._work_hour_req = value

    @property
    def work_hour_avg(self) -> float:
        """平均工时"""
        return self._work_hour_avg

    @work_hour_avg.setter
    def work_hour_avg(self, value: float):
        self._work_hour_avg = value

    @property
    def work_hour_real(self) -> float:
        """实填工时"""
        return self._work_hour_real

    @work_hour_real.setter
    def work_hour_real(self, value: float):
        self._work_hour_real = value

    @property
    def requirementThroughputRate(self) -> str:
        """需求吞吐率"""
        return self._requirementThroughputRate

    @requirementThroughputRate.setter
    def requirementThroughputRate(self, value: str):
        self._requirementThroughputRate = value
